<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">


<head th:replace="fragments/common_header :: common-header(~{},~{})"></head>
<body>
<div id="wrapper">
    <!-- 左侧菜单栏-->
    <div th:replace="fragments/common_leftmenu :: left-menu"></div>
    <!-- 左侧菜单栏结束-->
    <div id="page-wrapper" class="gray-bg">
        <!-- 上部导航条 -->
        <div th:replace="fragments/common_top :: top-bar"></div>
        <!-- 上部导航条结束 -->
        <!--内容-->
        <div class="wrapper wrapper-content animated ">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox ">
                        <div class="ibox-title">
                            <h2 th:text="'当前编辑的门店编号：'+${shop.getShop_number()}"></h2>
                        </div>
                        <div class="ibox-content">
                            <form th:method="post" th:action="@{/shop/update}">
                                <h3>编辑门店属性</h3>
                                <div class="form-group row">
                                    <div class="col-sm-2">
                                        <label class="col-form-label">所在城市：</label>
                                        <input type="text" class="form-control" name="shop_city" required="" maxlength="20"
                                               th:value="${shop.getShop_city()}" placeholder="所在城市">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">所属地区：</label>
                                        <input type="text" class="form-control" name="shop_area" required="" maxlength="20"
                                               th:value="${shop.getShop_area()}" placeholder="所属地区">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">名称：</label>
                                        <input type="text" class="form-control" name="shop_name"  maxlength="20"
                                               th:value="${shop.getShop_name()}" placeholder="名称">
                                    </div>

                                    <div class="col-sm-2">
                                        <label class="col-form-label">电话：</label>
                                        <input type="text" class="form-control" name="shop_phone" required="" maxlength="20"
                                               th:value="${shop.getShop_phone()}" placeholder="电话">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">营业时间：</label>
                                        <input type="text" class="form-control" name="shop_hours" required="" maxlength="20"
                                               th:value="${shop.getShop_hours()}" placeholder="营业时间">
                                    </div>

                                </div>
                                <div class="form-group row">
                                    <div class="col-sm-10">
                                        <label class="col-form-label">地址：</label>
                                        <input type="text" class="form-control" name="shop_address"maxlength="200"
                                               th:value="${shop.getShop_address()}" placeholder="地址">
                                    </div>
                                </div>
                                <!--隐藏区域开始-->
                                <input type="hidden" class="form-control" name="shop_number" th:value="${shop.getShop_number()}"/>

                                <!--隐藏区域结束-->
                                <div class="form-group">
                                    <div class="text-center">
                                        <button class="btn btn-white btn-lg"
                                                th:action="'@{/shop/toList'+${shop.getShop_name()}"
                                        >取消</button>
                                        <button class="btn btn-primary btn-lg" type="submit">保存</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!--内容结束-->
        <!-- 底部栏 -->
        <div th:replace="fragments/common_footer :: foot-bar"></div>
        <!-- 底部栏结束 -->
    </div>
</div>
<div th:replace="fragments/common_script :: scripts"></div>
<script>
    // 取消按钮
    function doCancel()
    {
        window.location.href = document.referrer;
    }
</script>
</body>
</html>